home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / Hash_CreateEntry.man < prev    next >
Encoding:
Text File  |  1992-04-21  |  2.4 KB  |  69 lines

  1.  
  2.  
  3.  
  4. Hash_CreateEntry      C Library Procedures       Hash_CreateEntry
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NNAAMMEE
  11.      Hash_CreateEntry, Hash_FindEntry  -  keyed  search  in  hash
  12.      table
  13.  
  14. SSYYNNOOPPSSIISS
  15.      ##iinncclluuddee <<hhaasshh..hh>>
  16.  
  17.      Hash_Entry *
  18.      HHaasshh__CCrreeaatteeEEnnttrryy(_t_a_b_l_e_P_t_r, _k_e_y, _n_e_w_P_t_r)
  19.  
  20.      Hash_Entry *
  21.      HHaasshh__FFiinnddEEnnttrryy(_t_a_b_l_e_P_t_r, _k_e_y)
  22.  
  23. AARRGGUUMMEENNTTSS
  24.      Hash_Table   *_t_a_b_l_e_P_t_r   (in)      Table in which to  search
  25.                                         for  entry  or create new
  26.                                         one.
  27.  
  28.      Address      _k_e_y         (in)      Key value that identifies
  29.                                         entry.     Exact   nature
  30.                                         depends on _k_e_y_T_y_p_e param-
  31.                                         eter       passed      to
  32.                                         Hash_InitTable.
  33.  
  34.      Boolean      *_n_e_w_P_t_r     (in)      If non-NULL, then *_n_e_w_P_t_r
  35.                                         is filled in with TRUE if
  36.                                         a new entry was  created,
  37.                                         or  FALSE  if  there  was
  38.                                         already an entry with the
  39.                                         given key.
  40.  
  41. _________________________________________________________________
  42.  
  43.  
  44. DDEESSCCRRIIPPTTIIOONN
  45.      Both HHaasshh__FFiinnddEEnnttrryy and  HHaasshh__CCrreeaatteeEEnnttrryy  search  the  hash
  46.      table  for an entry with the same key as _k_e_y.  If a matching
  47.      entry is found, both return the address of that entry, which
  48.      can  then  be  used  in  HHaasshh__GGeettVVaalluuee,  HHaasshh__SSeettVVaalluuee,  and
  49.      HHaasshh__DDeelleetteeEEnnttrryy calls.  If no matching entry is found  then
  50.      HHaasshh__FFiinnddEEnnttrryy  returns  NULL; in contrast, HHaasshh__CCrreeaatteeEEnnttrryy
  51.      will create a new entry with the given key  and  an  initial
  52.      value of NULL.
  53.  
  54.  
  55. KKEEYYWWOORRDDSS
  56.      hash table, key, search
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. Sprite v.1.0        Printed:  April 20, 1992                    1
  66.  
  67.  
  68.  
  69.